import axios from '../utils/http'

// 协议列表
export const systemAgreementList = (params) =>
  axios({
    url: '/v1/manager/agreement',
    method: 'get',
    params
  })

  // 协议列表 详情
export const systemAgreementListId = (params) =>
  axios({
    url: `/v1/manager/agreement/${params}`,
    method: 'get',
    
  })

// 版本列表 添加
export const systemAgreementListAdd = (data) =>
  axios({
    url: '/v1/manager/agreement',
    method: 'post',
    data
  })


//--------------------------------------------
// 版本列表
export const systemVersionsList = (params) =>
  axios({
    url: '/v1/manager/versions',
    method: 'get',
    params
  })

// 版本列表 详情
export const systemVersionsListId = (params) =>
  axios({
    url: `/v1/manager/versions/${params}`,
    method: 'get',
    
  })

// 版本列表 添加
export const systemVersionsListAdd = (data) =>
  axios({
    url: '/v1/manager/versions',
    method: 'post',
    data
  })

  
// 版本列表 删除
export const systemVersionsListDelete = (params) =>
  axios({
    url: `/v1/manager/versions/${params}`,
    method: 'delete'
  })

//--------------------------------------------------------
// 角色列表
export const systemRoleList = (params) =>
  axios({
    url: '/v1/manager/role/manager',
    method: 'get',
    params
  })

// 角色列表 详情
export const systemRoleListId = (params) =>
  axios({
    url: `/v1/manager/role/manager/${params}`,
    method: 'get',
  })


// 角色列表 添加
export const systemRoleListAdd = (data) =>
  axios({
    url: '/v1/manager/role/manager',
    method: 'post',
    data
  })

// 角色列表 删除
export const systemRoleListDelete = (params) =>
  axios({
    url: `/v1/manager/role/manager/${params}`,
    method: 'delete'
  })

//-----------------------------------------------------------
// 管理员列表
export const systemManagerList = (params) =>
  axios({
    url: '/v1/manager/manager',
    method: 'get',
    params
  })

// 管理员列表 详情
export const systemManagerListId = (params) =>
  axios({
    url: `/v1/manager/manager/${params}`,
    method: 'get',
  })

// 管理员列表 添加
export const systemManagerListAdd = (data) =>
  axios({
    url: '/v1/manager/manager',
    method: 'post',
    data
  })

// 管理员列表 禁用
export const systemManagerListForbid = (params) =>
  axios({
    url: `/v1/manager/manager/${params}`,
    method: 'put',
  })

// 管理员列表 删除
export const systemManagerListDelete = (params) =>
  axios({
    url: `/v1/manager/manager/${params}`,
    method: 'delete'
  })